package org.lennon.log.model;

import java.io.Serializable;
import java.sql.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;

import org.lennon.util.PageInfo;

public class LogModel extends PageInfo implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -5177507751718433177L;
	
	private String project;
	private String ip;
	private String lUser;
	private String uUser;
	private Date time;
	private Long timeLevel;
	private Long stampTime;
	private String reqMethod;
	private String reqUrl;
	private String reqStyle;
	private Integer statusCode ;
	private Integer sentedBytes;
	private Float timeTaken;
	private Date createTime;
	private String archived;
	
	/**
	 * @return the project
	 */
	public String getProject() {
		return project;
	}
	/**
	 * @param project the project to set
	 */
	public void setProject(String project) {
		this.project = project;
	}
	/**
	 * @return the ip
	 */
	public String getIp() {
		return ip;
	}
	/**
	 * @param ip the ip to set
	 */
	public void setIp(String ip) {
		this.ip = ip;
	}
	/**
	 * @return the l_user
	 */
	public String getL_user() {
		return lUser;
	}
	/**
	 * @param l_user the l_user to set
	 */
	public void setL_user(String l_user) {
		this.lUser = l_user;
	}
	/**
	 * @return the u_user
	 */
	public String getU_user() {
		return uUser;
	}
	/**
	 * @param u_user the u_user to set
	 */
	public void setU_user(String u_user) {
		this.uUser = u_user;
	}
	/**
	 * @return the time
	 */
	public Date getTime() {
		return time;
	}
	/**
	 * @param time the time to set
	 */
	public void setTime(Date time) {
		this.time = time;
		
		SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		SimpleDateFormat simpleDateFormat2=new SimpleDateFormat("yyyy-MM-dd HH");

		try {
			this.stampTime =  (simpleDateFormat.parse(simpleDateFormat.format(time)).getTime()/1000);
			this.timeLevel =  (simpleDateFormat2.parse(simpleDateFormat2.format(time)).getTime()/1000);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
	}
	
	/**
	 * @return the reqMethod
	 */
	public String getReqMethod() {
		return reqMethod;
	}
	/**
	 * @param reqMethod the reqMethod to set
	 */
	public void setReqMethod(String reqMethod) {
		this.reqMethod = reqMethod;
	}
	/**
	 * @return the reqUrl
	 */
	public String getReqUrl() {
		return reqUrl;
	}
	/**
	 * @param reqUrl the reqUrl to set
	 */
	public void setReqUrl(String reqUrl) {
		this.reqUrl = reqUrl;
	}
	/**
	 * @return the reqStyle
	 */
	public String getReqStyle() {
		return reqStyle;
	}
	/**
	 * @param reqStyle the reqStyle to set
	 */
	public void setReqStyle(String reqStyle) {
		this.reqStyle = reqStyle;
	}
	/**
	 * @return the statuscode
	 */
	public int getStatuscode() {
		return statusCode;
	}
	/**
	 * @param statuscode the statuscode to set
	 */
	public void setStatuscode(int statuscode) {
		this.statusCode = statuscode;
	}
	/**
	 * @return the sentedbytes
	 */
	public int getSentedbytes() {
		return sentedBytes;
	}
	/**
	 * @param sentedbytes the sentedbytes to set
	 */
	public void setSentedbytes(int sentedbytes) {
		this.sentedBytes = sentedbytes;
	}
	/**
	 * @return the timetaken
	 */
	public float getTimetaken() {
		return timeTaken;
	}
	/**
	 * @param timetaken the timetaken to set
	 */
	public void setTimetaken(float timetaken) {
		this.timeTaken = timetaken;
	}
	/**
	 * @return the create_time
	 */
	public Date getCreate_time() {
		return createTime;
	}
	/**
	 * @param create_time the create_time to set
	 */
	public void setCreate_time(Date create_time) {
		this.createTime = create_time;
	}
	/**
	 * @return the archived
	 */
	public String getArchived() {
		return archived;
	}
	/**
	 * @param archived the archived to set
	 */
	public void setArchived(String archived) {
		this.archived = archived;
	}
	
	
	

}
